COMPILER = g++
FLAGS = -g -o
INCLUDE = -I/home/zhanghui/software/mpg123-1.12/include
LINKAGE = -L/home/zhanghui/software/mpg123-1.12/lib \
				-lmpg123 -lasound -lpthread

EXECUTE = console
LIBRARY = libcamellia.so.0.0.1
LIBOBJS = CAlsa.o \
				CAudio.o \
				CAudioTag.o \
				COutput.o \
				CPlayList.o \
				CSemaphore.o \
				CSharedMemory.o \
				Globel.o
EXEOBJS = $(LIBOBJS) Application.o

.SUFFIXES:.o .cpp
.cpp.o:
	$(COMPILER) -fPIC -g -c  $< $(INCLUDE)
	
all:$(EXECUTE)
	
$(EXECUTE):$(EXEOBJS)
	$(COMPILER) $(EXEOBJS) $(INCLUDE) $(LINKAGE) $(FLAGS) $(EXECUTE)
	
libs:$(LIBRARY)

$(LIBRARY):$(LIBOBJS)
	$(COMPILER) -shared -fPIC $(LIBOBJS) $(INCLUDE) $(LINKAGE) $(FLAGS) $(LIBRARY) 

clean:
	rm -f $(EXECUTE) $(EXEOBJS) $(LIBARARY) core
